<template>
	<view class="set-page">
		<u-navbar title="账号与安全" :autoBack="true" :placeholder="true" bgColor="rgba(255,255,255,0)"></u-navbar>
		<view class="content">
			<view class="set-box">
				<!-- <view class="set-item">
					<view class="item-left">
						<image src="https://m.lqvvvv.com/assets/static/my/set-icon1.png" mode="heightFix"></image>
						<view class="item-text">
							微信绑定
						</view>
					</view>
					<view class="item-right">
						<view class="already">
							已绑定
						</view>
						<view class="nope">
							未绑定
						</view>
						<u-icon name="arrow-right" color="#8B8DA0" size="16"></u-icon>
					</view>
				</view> -->
				<view class="set-item" @click="$navTo.togo('/pages/login/forget',{type:'1'})">
					<view class="item-left">
						<image src="https://m.lqvvvv.com/assets/static/my/set-icon8.png" mode="heightFix"></image>
						<view class="item-text">
							修改密码
						</view>
					</view>
					<view>
						<u-icon name="arrow-right" color="#8B8DA0" size="16"></u-icon>
					</view>
				</view>
				<view class="set-item" @click="gooff">
					<view class="item-left">
						<image src="https://m.lqvvvv.com/assets/static/my/set-icon7.png" mode="heightFix"></image>
						<view class="item-text">
							注销账号
						</view>
					</view>
					<view>
						<u-icon name="arrow-right" color="#8B8DA0" size="16"></u-icon>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			gooff(){
				let app = this
				uni.showModal({
					title: '提示',
					content: '是否确定注销账号(请检查账号余额)！',
					success: function (res) {
						if (res.confirm) {
							console.log('用户点击确定');
							uni.showLoading({
								mask:true
							})
							app.$Request({
								method: 'POST',
								url: '/api/user/logoff',
								data: {},
								ismsg: true,
							}).then(res => {
								uni.hideLoading()
								if (res.code == 1) {
									uni.removeStorageSync('token')
									setTimeout(()=>{
										uni.reLaunch({
											url:'/pages/login/index'
										})
									},1000)
								}
							})
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			},
		}
	}
</script>

<style>
	page {
		background-color: #F7F8FC;
	}
</style>
<style lang="scss" scoped>
	.set-page {
		min-height: 100vh;
		background-image: url('https://m.lqvvvv.com/assets/static/index/nav-bg.png');
		background-repeat: no-repeat;
		background-size: 100% 800rpx;

		.content {
			padding: 30rpx;
			.out{
				margin-top: 100rpx;
			}
			.set-box {
				padding: 30rpx 30rpx 0;
				border-radius: 30rpx;
				background-color: #fff;

				.set-item {
					display: flex;
					justify-content: space-between;
					align-items: center;
					padding-bottom: 30rpx;
					margin-bottom: 30rpx;
					border-bottom: 1rpx solid #F7F7F7;

					.item-left {
						display: flex;
						align-items: center;

						image {
							width: 34rpx;
							height: 36rpx;
						}

						.item-text {
							font-size: 28rpx;
							color: #000000;
							margin-left: 50rpx;
						}
					}
					.item-right {
						display: flex;
						align-items: center;
						font-size: 28rpx;
						.already {
							margin-right: 20rpx;
							color: #00B95A;
						}
						.nope {
							margin-right: 20rpx;
							color: #999;
						}
					}
				}
			}
		}
	}
</style>